//
//  HomeRouter.swift
//  LeGou
//
//  Created by lxm on 2022/7/27.
//

import Foundation
class HomeRouter {
    // 路由
      static func initialize(navigator: NavigatorProtocol) {
          // 首页
          navigator.register("xm://main/Home/index") { url, values, context in
              return HomeVC_V2()
          }
          
          // 详情
          navigator.register("xm://main/Home/tb/detail") { url, values, context in
              let vc = TbDetailVC()
              vc.id = JSON(context!)["id"].stringValue
              vc.cid = JSON(context!)["cid"].intValue
              return vc
          }
          
          // 二级列表
          navigator.register("xm://main/Home/tb/cate_list") { url, values, context in
              return CateGoodsList()
          }
          
          // 签到
          navigator.register("xm://main/Home/sign") { url, values, context in
              return SignInVC()
          }
          
          // 转链
          navigator.register("xm://main/Home/change_link") { url, values, context in
              return ChangeLinkVC()
          }
      }
}

